As the Extensible Markup Language (XML) has continued to gain popularity as a standard for information representation and exchange, tools to render and present XML documents are increasingly supported by common application platforms. Many of these tools implement the XML Stylesheet Langauge (XSL), a World Wide Web Consortium (W3C) standard (see, for example, W3C, XSL Transformations (XSLT) Version 2.0, http://www.w3.org/TR/xslt20/). The XSL Stylesheet Langauge is divided into transformation and formatting subsystems. The transformation subsystem reorganizes the tree structure of an XML document and the formatting subsystem renders the result into a display format. The transformation sublanguage, referred to as XML Stylesheet Language Transformations, or XSLT, has proven very popular with developers and is often implemented as a standalone tool. Some of the well-known implementations of XSLT are XT™, SAXON™ and XALAN™. XSLT is used, for example, to translate XML documents to HTML documents, and to modify or select part of an XML document. While XSLT was not expressly designed as a query language, XSLT can be used for “query-like” transformations.
Despite widespread use of XML standards for business data exchange, the vast majority of business data is stored and maintained by relational database systems. Thus, XML-publishing middleware technology is rapidly being implemented by relational database vendors to ensure that XML-centric applications are well supported. Such middleware provides a declarative view query language with which to specify the desired mapping between the relational tables and the resulting XML document. Based on the mapping defined by the view query, a portion of the database can be exported as XML.
Given the respective importance of XML views and XSLT, it is important to propose efficient execution of XSLT stylesheets against XML-publishing views. For example, for large documents or complicated stylesheets, fully materializing the XML view as an XML document, upon which an XSLT stylesheet is evaluated is problematic, simply due to performance problems that commonly arise with XSLT evaluation on large documents. Recent work has explored optimizing the execution of XSLT transformations by incorporating XSLT processing into database query engines. However, even if XSLT evaluation can be made scalable and efficient, it may not be a good solution for XML documents published from relational database systems. For example, it is not necessary to materialize many of the nodes in the view query to produce the correct XSLT result document. First, node types not referenced by any XPATH expressions in the XSLT stylesheet need not be materialized. Similarly, nodes that do not match selection conditions in the appropriate XSLT templates are not useful. Finally, intermediate nodes along the XPATH expression need not be materialized if they are not part of the result. A need therefore exists for a view composition approach to supporting XSLT in relational XML middleware.